Repository navigation
Conversation
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — New thread now starts directly in the sidebar's single scoped project rather than opening the project picker. Human review is required for this change to the default project-selection behavior. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
While the sidebar is filtered to one project, its New button opened the "New thread in..." picker. It now starts the thread in that project. When the viewed thread belongs to the scoped project, its environment is kept, so a project grouped across machines stays on the viewed machine. Shift+click, several scoped projects, the folder sidebar, chat.new, chat.newLocal and the landing route keep their behavior.
ce9f4a6 to
0510ac3
Compare
Replaces #14165, which was closed for age with a note to open a fresh PR from current
main. This is a new implementation in one commit on currentmain. Request and discussion: #17988.Problem
With the sidebar filtered to one project, the sidebar's New thread button still opens the project picker. The sidebar already says which project I am working in, so every new thread costs a second click to repeat that choice.
Change
When exactly one project is selected in the sidebar filter, a plain click on New thread opens a draft in that project. If the thread I am viewing belongs to that project, its environment is kept, so a project grouped across machines stays on the viewed machine.
The rule is one pure function,
resolveScopedNewThreadProjectRefinSidebar.logic.ts, called at the top of the button's click handler. It reads the scope the sidebar is actually showing, so a route reveal that widens the list back to all projects also returns the button to its usual rule.Unchanged: Shift-click (viewed project), "All projects" and several selected projects (existing rule), the folder sidebar,
chat.new,chat.newLocal, the command palette, and the landing route.The scoped case no longer opens a dialog, so keyboard and switch users activating the button also skip a second target.
How I checked it
vp run check:changed refs/remotes/origin/mainpasses: format, lint, knip, typecheck, React Compiler, and the tests beside the changed files. Three new unit tests cover the scoped project while another project's thread is open, keeping the viewed environment inside a grouped project, and the cases left to the existing rule (Shift, no scope, several scoped projects).mainwith the same data. Filtered toacme-apiwhile viewing a thread inserver:main: New opens the "New thread in…" picker.acme-api. Shift-click opens a draft inserver. Switching the filter toacme-weband clicking New opens a draft inacme-web.main)Before, on
main:before-scoped-new-thread.mp4
After, on this branch:
after-scoped-new-thread.mp4
Implemented and verified by Claude Fable 5.2 through the Claude Code harness in T3 Code.